package org.rain.common.anno;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * created by yangtong on 2025/4/13 18:17:56
 * <br/>
 * 幂等性接口
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Limit {

    String value() default "";

    //最小间隔时间，默认 1 分钟
    long minIntervalMillis() default 60000;

    //窗口期
    long timeWindowMillis() default 300000;

    //窗口期内最多次数
    int maxCalls() default 3;
}
